﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Wangzeran.CodeMaker.Core.Model
{
    /// <summary>
    /// 列信息实体
    /// </summary>
    public class ColumnModal
    {

        #region Fields

        /// <summary>
        /// 列名
        /// </summary>
        private string columnName;
        /// <summary>
        /// 列类型
        /// </summary>
        private string columnType;
        /// <summary>
        /// 是否主键
        /// </summary>
        private bool isPrimaryKey;
        /// <summary>
        /// 是否外键
        /// </summary>
        private bool isForeignKey;
        /// <summary>
        /// 类型长度
        /// </summary>
        private int length;
        /// <summary>
        /// 是否为空
        /// </summary>
        private bool isNull;
        /// <summary>
        /// 值
        /// </summary>
        private object value;
        /// <summary>
        /// 描述
        /// </summary>
        private string description;
        /// <summary>
        /// 表名
        /// </summary>
        private string tableName;
        /// <summary>
        /// 引用的表名
        /// </summary>
        private string referenceTableName;
        /// <summary>
        /// 引用表对应的列名
        /// </summary>
        private string referenceColumnName;
        /// <summary>
        /// 外部引用的表名
        /// </summary>
        private string extraReferenceTableName;

        #endregion


        #region Properties

        /// <summary>
        /// 列名
        /// </summary>
        public string ColumnName
        {
            get { return columnName; }
            set { columnName = value; }
        }
        /// <summary>
        /// 列类型
        /// </summary>
        public string ColumnType
        {
            get { return columnType; }
            set { columnType = value; }
        }
        /// <summary>
        /// 是否主键
        /// </summary>
        public bool IsPrimaryKey
        {
            get { return isPrimaryKey; }
            set { isPrimaryKey = value; }
        }
        /// <summary>
        /// 是否外键
        /// </summary>
        public bool IsForeignKey
        {
            get { return isForeignKey; }
            set { isForeignKey = value; }
        }
        /// <summary>
        /// 类型长度
        /// </summary>
        public int Length
        {
            get { return length; }
            set { length = value; }
        }
        /// <summary>
        /// 是否为空
        /// </summary>
        public bool IsNull
        {
            get { return isNull; }
            set { isNull = value; }
        }
        /// <summary>
        /// 值
        /// </summary>
        public object Value
        {
            get { return this.value; }
            set { this.value = value; }
        }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description
        {
            get { return description; }
            set { description = value; }
        }
        /// <summary>
        /// 表名
        /// </summary>
        public string TableName
        {
            get { return tableName; }
            set { tableName = value; }
        }
        /// <summary>
        /// 引用的表名
        /// </summary>
        public string ReferenceTableName
        {
            get { return referenceTableName; }
            set { referenceTableName = value; }
        }
        /// <summary>
        /// 引用表对应的列名
        /// </summary>
        public string ReferenceColumnName
        {
            get { return referenceColumnName; }
            set { referenceColumnName = value; }
        }
        /// <summary>
        /// 外部引用的表名
        /// </summary>
        public string ExtraReferenceTableName
        {
            get { return extraReferenceTableName; }
            set { extraReferenceTableName = value; }
        }

        #endregion


    }
}
